package com.dang.apj.serviceImp;

import java.sql.SQLException;

import com.dang.apj.factory.DaoFactory;
import com.dang.apj.model.User;
import com.dang.apj.service.UserService;

public class UserServiceImpl implements UserService {

	@Override
	public void save(User user) throws SQLException {
		DaoFactory.getUserDaoImpl().save(user);
	}

	@Override
	public void update(User user) throws SQLException {
		DaoFactory.getUserDaoImpl().update(user);
	}

	@Override
	public User findByEmail(String email) throws SQLException {
	
		return DaoFactory.getUserDaoImpl().findByEmail(email);
	}

	@Override
	public User findById(int id) throws SQLException {
		
		return DaoFactory.getUserDaoImpl().findById(id);
	}

}
